﻿using System;
using System.Globalization;
using System.Windows.Data;

namespace LS.DicomViewer.Converters
{
    public class BoolToValueConverter : IValueConverter
    {
        public object TrueValue { get; set; }

        public object FalseValue { get; set; }

        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return value != null && (value.Equals(true) || value.ToString().ToLower().Equals("true")) ? TrueValue : FalseValue;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}